-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Update readme to make code example run #75
Conversation
ohh, make sense tbh |
README.md
Outdated
const ANOTHER_TOKEN_ADDRESS: &str = "0x0000000000000000000000000000000000000002"; | ||
let another_token = token!(CHAIN_ID, ANOTHER_TOKEN_ADDRESS, DECIMALS, "ETH", "Ethereum"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ANOTHER_TOKEN_ADDRESS: &str = "0x0000000000000000000000000000000000000002"; | |
let another_token = token!(CHAIN_ID, ANOTHER_TOKEN_ADDRESS, DECIMALS, "ETH", "Ethereum"); | |
let another_token = token!( | |
CHAIN_ID, | |
"0000000000000000000000000000000000000002", | |
DECIMALS, | |
"ETH", | |
"Ethereum" | |
); |
token!
can take either string literal or &str
. If passing string literal to address!
macro, "0x" should be stripped.
README.md
Outdated
use uniswap_sdk_core::prelude::*; | ||
use uniswap_sdk_core::token; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use uniswap_sdk_core::prelude::*; | |
use uniswap_sdk_core::token; | |
use crate::{prelude::*, token}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx.
Hi, had to to make a couple updates to the code example in the readme to get it to run on my machine. Might have been something I did wrong, but this runs out of the box for me. Sharing in case it's useful.